package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Resource;
import com.springboot.astra.mapper.ResourceMapper;
import com.springboot.astra.service.ResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResourceServiceImpl implements ResourceService {
    @Autowired
    ResourceMapper resourceMapper;

    @Override
    public List<Resource> getResourceByPid(Integer pid) throws Exception {
        return resourceMapper.getResourceByPid(pid);
    }

    @Override
    public List<Resource> getAllResource() {
        return resourceMapper.getAllResource();
    }

    @Override
    public Resource getOneById(Integer id) {
        return resourceMapper.getOneById(id);
    }
}
